3.3.13 \(\int (a g+b g x)^m (c i+d i x)^{-2-m} (A+B \log (e (\frac {a+b x}{c+d x})^n))^2 \, dx\) [213]

Optimal. Leaf size=210 \[ \frac {2 B^2 n^2 (a+b x) (g (a+b x))^m (i (c+d x))^{-m}}{(b c-a d) i^2 (1+m)^3 (c+d x)}-\frac {2 B n (a+b x) (g (a+b x))^m (i (c+d x))^{-m} \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d) i^2 (1+m)^2 (c+d x)}+\frac {(a+b x) (g (a+b x))^m (i (c+d x))^{-m} \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(b c-a d) i^2 (1+m) (c+d x)} \]

[Out]

2*B^2*n^2*(b*x+a)*(g*(b*x+a))^m/(-a*d+b*c)/i^2/(1+m)^3/(d*x+c)/((i*(d*x+c))^m)-2*B*n*(b*x+a)*(g*(b*x+a))^m*(A+
B*ln(e*((b*x+a)/(d*x+c))^n))/(-a*d+b*c)/i^2/(1+m)^2/(d*x+c)/((i*(d*x+c))^m)+(b*x+a)*(g*(b*x+a))^m*(A+B*ln(e*((
b*x+a)/(d*x+c))^n))^2/(-a*d+b*c)/i^2/(1+m)/(d*x+c)/((i*(d*x+c))^m)

________________________________________________________________________________________

Rubi [A]
time = 0.17, antiderivative size = 210, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 49, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {2563, 2342, 2341} \begin {gather*} \frac {(a+b x) (g (a+b x))^m (i (c+d x))^{-m} \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{i^2 (m+1) (c+d x) (b c-a d)}-\frac {2 B n (a+b x) (g (a+b x))^m (i (c+d x))^{-m} \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{i^2 (m+1)^2 (c+d x) (b c-a d)}+\frac {2 B^2 n^2 (a+b x) (g (a+b x))^m (i (c+d x))^{-m}}{i^2 (m+1)^3 (c+d x) (b c-a d)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a*g + b*g*x)^m*(c*i + d*i*x)^(-2 - m)*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2,x]

[Out]

(2*B^2*n^2*(a + b*x)*(g*(a + b*x))^m)/((b*c - a*d)*i^2*(1 + m)^3*(c + d*x)*(i*(c + d*x))^m) - (2*B*n*(a + b*x)
*(g*(a + b*x))^m*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/((b*c - a*d)*i^2*(1 + m)^2*(c + d*x)*(i*(c + d*x))^m)
 + ((a + b*x)*(g*(a + b*x))^m*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2)/((b*c - a*d)*i^2*(1 + m)*(c + d*x)*(i*
(c + d*x))^m)

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2563

Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m
_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol] :> Dist[d^2*((g*((a + b*x)/b))^m/(i^2*(b*c - a*d)*(i*((c + d*x)/d))^
m*((a + b*x)/(c + d*x))^m)), Subst[Int[x^m*(A + B*Log[e*x^n])^p, x], x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a,
b, c, d, e, f, g, h, i, A, B, m, n, p, q}, x] && NeQ[b*c - a*d, 0] && EqQ[b*f - a*g, 0] && EqQ[d*h - c*i, 0] &
& EqQ[m + q + 2, 0]

Rubi steps

\begin {align*} \int (213 c+213 d x)^{-2-m} (a g+b g x)^m \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 \, dx &=\int \left (A^2 (213 c+213 d x)^{-2-m} (a g+b g x)^m+2 A B (213 c+213 d x)^{-2-m} (a g+b g x)^m \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+B^2 (213 c+213 d x)^{-2-m} (a g+b g x)^m \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx\\ &=A^2 \int (213 c+213 d x)^{-2-m} (a g+b g x)^m \, dx+(2 A B) \int (213 c+213 d x)^{-2-m} (a g+b g x)^m \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx+B^2 \int (213 c+213 d x)^{-2-m} (a g+b g x)^m \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx\\ &=\frac {A^2 (213 c+213 d x)^{-1-m} (a g+b g x)^{1+m}}{213 (b c-a d) g (1+m)}+\frac {2 A B (213 c+213 d x)^{-1-m} (a g+b g x)^{1+m} \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{213 (b c-a d) g (1+m)}-(2 A B) \int \frac {213^{-2-m} n (c+d x)^{-2-m} (a g+b g x)^m}{1+m} \, dx+B^2 \int (213 c+213 d x)^{-2-m} (a g+b g x)^m \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx\\ &=\frac {A^2 (213 c+213 d x)^{-1-m} (a g+b g x)^{1+m}}{213 (b c-a d) g (1+m)}+\frac {2 A B (213 c+213 d x)^{-1-m} (a g+b g x)^{1+m} \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{213 (b c-a d) g (1+m)}+B^2 \int (213 c+213 d x)^{-2-m} (a g+b g x)^m \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx-\frac {\left (2\ 213^{-2-m} A B n\right ) \int (c+d x)^{-2-m} (a g+b g x)^m \, dx}{1+m}\\ &=-\frac {2\ 213^{-2-m} A B n (c+d x)^{-1-m} (a g+b g x)^{1+m}}{(b c-a d) g (1+m)^2}+\frac {A^2 (213 c+213 d x)^{-1-m} (a g+b g x)^{1+m}}{213 (b c-a d) g (1+m)}+\frac {2 A B (213 c+213 d x)^{-1-m} (a g+b g x)^{1+m} \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{213 (b c-a d) g (1+m)}+B^2 \int (213 c+213 d x)^{-2-m} (a g+b g x)^m \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.32, size = 134, normalized size = 0.64 \begin {gather*} \frac {(a+b x) (g (a+b x))^m (i (c+d x))^{-1-m} \left (A^2 (1+m)^2-2 A B (1+m) n+2 B^2 n^2+2 B (1+m) (A+A m-B n) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+B^2 (1+m)^2 \log ^2\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d) i (1+m)^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a*g + b*g*x)^m*(c*i + d*i*x)^(-2 - m)*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2,x]

[Out]

((a + b*x)*(g*(a + b*x))^m*(i*(c + d*x))^(-1 - m)*(A^2*(1 + m)^2 - 2*A*B*(1 + m)*n + 2*B^2*n^2 + 2*B*(1 + m)*(
A + A*m - B*n)*Log[e*((a + b*x)/(c + d*x))^n] + B^2*(1 + m)^2*Log[e*((a + b*x)/(c + d*x))^n]^2))/((b*c - a*d)*
i*(1 + m)^3)

________________________________________________________________________________________

Maple [F]
time = 0.21, size = 0, normalized size = 0.00 \[\int \left (b g x +a g \right )^{m} \left (d i x +c i \right )^{-2-m} \left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )^{2}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*g*x+a*g)^m*(d*i*x+c*i)^(-2-m)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2,x)

[Out]

int((b*g*x+a*g)^m*(d*i*x+c*i)^(-2-m)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*g*x+a*g)^m*(d*i*x+c*i)^(-2-m)*(A+B*log(e*((b*x+a)/(d*x+c))^n))^2,x, algorithm="maxima")

[Out]

integrate((B*log(((b*x + a)/(d*x + c))^n*e) + A)^2*(b*g*x + a*g)^m*(I*d*x + I*c)^(-m - 2), x)

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 799 vs. \(2 (207) = 414\).
time = 0.40, size = 799, normalized size = 3.80 \begin {gather*} \frac {{\left (2 \, B^{2} a c n^{2} + {\left (A^{2} + 2 \, A B + B^{2}\right )} a c m^{2} + 2 \, {\left (A^{2} + 2 \, A B + B^{2}\right )} a c m + {\left (A^{2} + 2 \, A B + B^{2}\right )} a c + {\left (2 \, B^{2} b d n^{2} + {\left (A^{2} + 2 \, A B + B^{2}\right )} b d m^{2} + 2 \, {\left (A^{2} + 2 \, A B + B^{2}\right )} b d m + {\left (A^{2} + 2 \, A B + B^{2}\right )} b d - 2 \, {\left ({\left (A B + B^{2}\right )} b d m + {\left (A B + B^{2}\right )} b d\right )} n\right )} x^{2} + {\left ({\left (B^{2} b d m^{2} + 2 \, B^{2} b d m + B^{2} b d\right )} n^{2} x^{2} + {\left (B^{2} b c + B^{2} a d + {\left (B^{2} b c + B^{2} a d\right )} m^{2} + 2 \, {\left (B^{2} b c + B^{2} a d\right )} m\right )} n^{2} x + {\left (B^{2} a c m^{2} + 2 \, B^{2} a c m + B^{2} a c\right )} n^{2}\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} - 2 \, {\left ({\left (A B + B^{2}\right )} a c m + {\left (A B + B^{2}\right )} a c\right )} n + {\left ({\left (A^{2} + 2 \, A B + B^{2}\right )} b c + {\left (A^{2} + 2 \, A B + B^{2}\right )} a d + {\left ({\left (A^{2} + 2 \, A B + B^{2}\right )} b c + {\left (A^{2} + 2 \, A B + B^{2}\right )} a d\right )} m^{2} + 2 \, {\left (B^{2} b c + B^{2} a d\right )} n^{2} + 2 \, {\left ({\left (A^{2} + 2 \, A B + B^{2}\right )} b c + {\left (A^{2} + 2 \, A B + B^{2}\right )} a d\right )} m - 2 \, {\left ({\left (A B + B^{2}\right )} b c + {\left (A B + B^{2}\right )} a d + {\left ({\left (A B + B^{2}\right )} b c + {\left (A B + B^{2}\right )} a d\right )} m\right )} n\right )} x - 2 \, {\left ({\left (B^{2} a c m + B^{2} a c\right )} n^{2} + {\left ({\left (B^{2} b d m + B^{2} b d\right )} n^{2} - {\left ({\left (A B + B^{2}\right )} b d m^{2} + 2 \, {\left (A B + B^{2}\right )} b d m + {\left (A B + B^{2}\right )} b d\right )} n\right )} x^{2} - {\left ({\left (A B + B^{2}\right )} a c m^{2} + 2 \, {\left (A B + B^{2}\right )} a c m + {\left (A B + B^{2}\right )} a c\right )} n + {\left ({\left (B^{2} b c + B^{2} a d + {\left (B^{2} b c + B^{2} a d\right )} m\right )} n^{2} - {\left ({\left (A B + B^{2}\right )} b c + {\left (A B + B^{2}\right )} a d + {\left ({\left (A B + B^{2}\right )} b c + {\left (A B + B^{2}\right )} a d\right )} m^{2} + 2 \, {\left ({\left (A B + B^{2}\right )} b c + {\left (A B + B^{2}\right )} a d\right )} m\right )} n\right )} x\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} {\left (i \, d x + i \, c\right )}^{-m - 2} e^{\left (m \log \left (i \, d x + i \, c\right ) + m \log \left (-i \, g\right ) + m \log \left (\frac {b x + a}{d x + c}\right )\right )}}{{\left (b c - a d\right )} m^{3} + 3 \, {\left (b c - a d\right )} m^{2} + b c - a d + 3 \, {\left (b c - a d\right )} m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*g*x+a*g)^m*(d*i*x+c*i)^(-2-m)*(A+B*log(e*((b*x+a)/(d*x+c))^n))^2,x, algorithm="fricas")

[Out]

(2*B^2*a*c*n^2 + (A^2 + 2*A*B + B^2)*a*c*m^2 + 2*(A^2 + 2*A*B + B^2)*a*c*m + (A^2 + 2*A*B + B^2)*a*c + (2*B^2*
b*d*n^2 + (A^2 + 2*A*B + B^2)*b*d*m^2 + 2*(A^2 + 2*A*B + B^2)*b*d*m + (A^2 + 2*A*B + B^2)*b*d - 2*((A*B + B^2)
*b*d*m + (A*B + B^2)*b*d)*n)*x^2 + ((B^2*b*d*m^2 + 2*B^2*b*d*m + B^2*b*d)*n^2*x^2 + (B^2*b*c + B^2*a*d + (B^2*
b*c + B^2*a*d)*m^2 + 2*(B^2*b*c + B^2*a*d)*m)*n^2*x + (B^2*a*c*m^2 + 2*B^2*a*c*m + B^2*a*c)*n^2)*log((b*x + a)
/(d*x + c))^2 - 2*((A*B + B^2)*a*c*m + (A*B + B^2)*a*c)*n + ((A^2 + 2*A*B + B^2)*b*c + (A^2 + 2*A*B + B^2)*a*d
 + ((A^2 + 2*A*B + B^2)*b*c + (A^2 + 2*A*B + B^2)*a*d)*m^2 + 2*(B^2*b*c + B^2*a*d)*n^2 + 2*((A^2 + 2*A*B + B^2
)*b*c + (A^2 + 2*A*B + B^2)*a*d)*m - 2*((A*B + B^2)*b*c + (A*B + B^2)*a*d + ((A*B + B^2)*b*c + (A*B + B^2)*a*d
)*m)*n)*x - 2*((B^2*a*c*m + B^2*a*c)*n^2 + ((B^2*b*d*m + B^2*b*d)*n^2 - ((A*B + B^2)*b*d*m^2 + 2*(A*B + B^2)*b
*d*m + (A*B + B^2)*b*d)*n)*x^2 - ((A*B + B^2)*a*c*m^2 + 2*(A*B + B^2)*a*c*m + (A*B + B^2)*a*c)*n + ((B^2*b*c +
 B^2*a*d + (B^2*b*c + B^2*a*d)*m)*n^2 - ((A*B + B^2)*b*c + (A*B + B^2)*a*d + ((A*B + B^2)*b*c + (A*B + B^2)*a*
d)*m^2 + 2*((A*B + B^2)*b*c + (A*B + B^2)*a*d)*m)*n)*x)*log((b*x + a)/(d*x + c)))*(I*d*x + I*c)^(-m - 2)*e^(m*
log(I*d*x + I*c) + m*log(-I*g) + m*log((b*x + a)/(d*x + c)))/((b*c - a*d)*m^3 + 3*(b*c - a*d)*m^2 + b*c - a*d
+ 3*(b*c - a*d)*m)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*g*x+a*g)**m*(d*i*x+c*i)**(-2-m)*(A+B*ln(e*((b*x+a)/(d*x+c))**n))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*g*x+a*g)^m*(d*i*x+c*i)^(-2-m)*(A+B*log(e*((b*x+a)/(d*x+c))^n))^2,x, algorithm="giac")

[Out]

integrate((B*log(((b*x + a)/(d*x + c))^n*e) + A)^2*(b*g*x + a*g)^m*(I*d*x + I*c)^(-m - 2), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a\,g+b\,g\,x\right )}^m\,{\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}^2}{{\left (c\,i+d\,i\,x\right )}^{m+2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a*g + b*g*x)^m*(A + B*log(e*((a + b*x)/(c + d*x))^n))^2)/(c*i + d*i*x)^(m + 2),x)

[Out]

int(((a*g + b*g*x)^m*(A + B*log(e*((a + b*x)/(c + d*x))^n))^2)/(c*i + d*i*x)^(m + 2), x)

________________________________________________________________________________________